// Copyright DustedPixels.com 2008. All rights reserved.

package com.dustedpixels.common;

/**
 * @author micapolos@gmail.com (Michal Pociecha-Los)
 */
public final class Objects {
  /**
   * Returns true if {@code o1} is equal to {@code o2}.
   * 
   * @param o1 first object or null
   * @param o2 second object or null
   * @return true, if p1 is equal to o2
   */
  public static boolean eq(Object o1, Object o2) {
    if (o1 == o2) return true;
    if (o1 != null && o2 != null) return o1.equals(o2);
    return false;
  }
}
